﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Mime;
using System.ServiceModel.Dispatcher;
using System.Web;
using CHPM.IC.Logger;

namespace CHPM.SL.TheService.Code.ErrorHandling
{
    public class ErrorHandler : IErrorHandler 
    {
        private readonly ILogger _logger;
        public ErrorHandler(ILogger logger)
        {
            _logger = logger;
        }
        public bool HandleError(Exception error)
        {
            _logger.Info(error.Message,error);
            return false; 
        }

        public void ProvideFault(Exception error, System.ServiceModel.Channels.MessageVersion version, ref System.ServiceModel.Channels.Message fault)
        {
        }
    }
}